#!/bin/bash

fileName="$(ls |grep $1 |sed 's/\.c//g')"
varName="$(echo $fileName |tr 'a-z' 'A-Z')"
echo "#ifndef $varName" > $fileName.h
echo "#define $varName" >> $fileName.h
grep 'EXPORT' $fileName.c |sed 's/EXPORT/\t/g' |sed 's/[{]//g'  |sed 's/^ //g'|sed 's/)/);/g' >>  $fileName.h

echo "#endif" >> $fileName.h
